package sourcecode;

/**
 * 插件接口
 */
public interface Interceptor {
    /**
     * 执行方法
     */
    Object intercept(Invocation invocation) throws Throwable;

    default Object plugin(Object target) throws NoSuchMethodException {
        return Plugin.wrap(target, this);
    }
}
